From: Ewan Mellor Date: Thu, 28 Dec 2006 15:52:31 +0000 (+0000) Subject: Format Xen-API error messages nicely. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15422^2~134 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=a80a083a0ef30c476d214da81a6eccfb3d64d76e;p=xen.git Format Xen-API error messages nicely. Signed-off-by: Ewan Mellor --- diff --git a/tools/python/xen/xm/main.py b/tools/python/xen/xm/main.py index 5f27680a5e..3feb864f16 100644 --- a/tools/python/xen/xm/main.py +++ b/tools/python/xen/xm/main.py @@ -1780,7 +1780,8 @@ def _run_cmd(cmd, cmd_name, args): except SystemExit, code: return code == 0, code except XenAPI.Failure, exn: - print >>sys.stderr, str(exn) + for line in [''] + wrap(str(exn), 80) + ['']: + print >>sys.stderr, line except xmlrpclib.Fault, ex: if ex.faultCode == XendClient.ERROR_INVALID_DOMAIN: err("Domain '%s' does not exist." % ex.faultString)